package cn.itcast.bos.service.take_delivery;

import java.util.Date;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import cn.itcast.bos.domain.take_delivery.PageBean;
import cn.itcast.bos.domain.take_delivery.Promotion;

public interface PromotionService {
    //保存促销活动信息
	public void save(Promotion promotion);
    //后台分页查询
	public Page<Promotion> pageQuery(Pageable pageable);

	
	//前台分页查询，运用webService技术
	
	@GET
	@Path("/pageQuery")
	@Produces({"application/xml","application/json"})//规定返回参数的格式
	public  PageBean<Promotion> pageQuery(@QueryParam("page") Integer page, @QueryParam("rows") Integer rows);
	
	
	@GET
	@Path("/promotionDetials")
	@Produces({"application/xml","application/json"})
	public  Promotion findPomotionById(@QueryParam("id") Integer id);
	
	public void updateStatus(Date date);
	
}
